package com.simpleplayer.views.customview;

import android.content.Context;
import android.util.AttributeSet;

import com.simpleplayer.R;

public class CustomTextView extends androidx.appcompat.widget.AppCompatTextView {

    public CustomTextView(Context context) {
        super(context);
    }

    public CustomTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public void setTextAndShow(int text) {
        super.setText(text);
        setVisibility(VISIBLE);
    }

    public void setTextAndShow(String text) {
        super.setText(text);
        setVisibility(VISIBLE);
    }

    public void clearAndHide() {
        super.setText(R.string.empty_string);
        setVisibility(GONE);
    }
}
